import http from "../../common/http.js";

/**
 * @des 服务人员列表
 * @param latitude
 * @param longitude
 * @param distance 距离
 * @param district_id 区id
 * @param time_type 时间段
 */
export function workerList(data, needLoading) {
  return http.GET("/worker/worker-list", data, needLoading);
}

/**
 * @des 获取服务人员筛选
 * @param latitude
 * @param longitude
 */
export function workerIndex(data, needLoading) {
  return http.GET("/worker/worker-index", data, needLoading);
}

/**
 * @des 获取服务人员详情
 * @param id
 */
export function workerInfo(data, needLoading) {
  return http.GET("/worker/worker-info", data, needLoading);
}

/**
 * @des 获取服务商品详情
 * @param latitude
 * @param longitude
 * @param id
 */
export function goodsInfo(data, needLoading) {
  return http.GET("/worker/worker-goods-info", data, needLoading);
}

/**
 * @des 服务订单列表
 * @param status
 */
export function orderList(data, needLoading) {
  return http.GET("/worker-order/worker-order-list", data, needLoading);
}

/**
 * @des 服务订单进度
 * @param id
 */
export function orderProgress(data, needLoading) {
  return http.GET("/worker-order/worker-order-progress", data, needLoading);
}

/**
 * @des 服务订单取消原因
 */
export function orderCancelReason(data, needLoading) {
  return http.GET(
    "/worker-order/worker-order-cancel-reason",
    data,
    needLoading
  );
}

/**
 * @des 服务订单取消
 * @param id
 * @param status
 */
export function orderCancel(data, needLoading) {
  return http.GET("/worker-order/worker-order-cancel", data, needLoading);
}

/**
 * @des 服务订单详情
 * @param id
 */
export function orderInfo(data, needLoading) {
  return http.GET("/worker-order/worker-order-info", data, needLoading);
}

/**
 * @des 服务订单评价商品信息获取
 * @param id
 * @param goods_id
 */
export function orderGoodsInfo(data, needLoading) {
  return http.GET("/worker-order/get-order-goods-info", data, needLoading);
}

/**
 * @des 获取分类列表
 */
export function goodsCateList(data, needLoading) {
  return http.GET("/worker/worker-goods-cate-list", data, needLoading);
}

/**
 * @des 根据分类id获取服务商品列表
 * @param cat_id
 */
export function goodsList(data, needLoading) {
  return http.GET("/worker/worker-goods-list", data, needLoading);
}
